Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing /
Chapter 2 - Core Printing Features / Core Printing Features Reference
Functions / Printing With QuickDraw GX


GXStartPage

You can use the GXStartPage function to print each page in a document if your application does not store each page as a single picture shape.

Boolean GXStartPage (gxJob aJob, long pageNumber,
                     gxFormat aFormat, long numViewPorts,
                     gxViewPort *viewPortList);
aJob
A reference to the job object being printed.
pageNumber

The page number of the page being printed.
aFormat
A reference to the format object for the page.
numViewPorts
The number of view ports contained in the viewPortList parameter.
viewPortList
A pointer to the list of references to view ports to use to capture shapes.
function result
Returns true if the page you specify in the pageNumber parameter is within the user-specified page range, false if the page you specify is not.
DESCRIPTION
You use the GXStartPage function to start printing the shapes drawn with GXDrawShape. You call the GXStartPage function after you call the GXStartJob function.

In the GXStartPage function, you specify in the pageNumber parameter the page number of the page to print. QuickDraw GX compares the specified page number with the page range. The GXStartPage function returns true if the page you specify is within the user-specified page range, and returns false if it is not. You can call the GXGetJobPageRange function to determine the range of pages.

In the viewPortList parameter, you specify the view ports to use to capture shapes. The part of the shape that is drawn through a view port is printed. In the numViewPorts parameter, you specify the number of view ports in the viewPortList parameter.

SPECIAL CONSIDERATIONS
After you finish calling the GXStartPage function, you should immediately check for errors using the GXGetJobError function. Only if no errors are returned should you draw the page's shapes and call the GXFinishPage function.

RESULT CODES
gxPrUserAbortErrThe user has canceled printing.
gxSegmentLoadFailedErrA required code segment could not be found, or there was not enough memory to load it.
SEE ALSO
Listing 2-6 on page 2-23 shows how to use the GXStartPage function to print each page of a document.

The GXDrawShape function is discussed in the shape objects chapter of Inside Macintosh: GX Objects.

View port objects are discussed in the view-related objects chapter of Inside Macintosh: GX Objects.

The GXFinishPage function is described in the next section. The GXGetJobError function is described on page 2-52. The GXGetJobPageRange function is described on page 2-62.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help